{% extends 'blog/base_news.html' %}

{# 页面标题 #}
{% block title %}
    
{% endblock %}

{# 页面内容 #}
{% block content %}
<h3>{{ blog_type.type_name }}</h3>
{% for blog in blogs %}

        <h3>{{ blog.title }}</h3>
        <p>作者:{{ blog.author }}</p>
        <p>发表日期:{{ blog.created_time }}</p>
        <p>分类:
            <a href="{% url 'blogs_with_type' blog.blog_types.pk %}">
                    {{ blog.blog_types }}
            </a>
        </p>
        <p>{{ blog.content|truncatechars:30 }}</p>
        <hr>
    {% empty %}
    <p>-- 暂无博客，敬请期待 --</p>
{% endfor %}
<p>一共有{{ blogs|length }}篇博客</p>

{% endblock %}
